import request from '@/utils/request'
 
export const getJingjiList = (_limit, _start, name_contains) => request({
  url: '/agents',
  params: {
    _limit,
    _start,
    name_contains
  }
})

export const getJingjiCount = (name_contains) => request({
  url: '/agents/count',
  params: {
    name_contains
  }
})

export const addJingji = data => request({
  url: '/agents',
  method: 'post',
  data
})

export const oneJingji = id => request({
  url: `/agents/${id}`,
})

export const editJingji = data => request({
  url: `/agents/${data.id}`,
  method: 'put',
  data
})

export const delJingji = id => request({
  url: `/agents/${id}`,
  method: 'delete',
})
